var i = 0;
var j = 0;
var k = 0;
(jQuery);
jQuery(document).ready(function($) {
    $('body').click(function(e) {
        $('.mouse-click').css({'top':e.pageY-5, 'left':e.pageX-5});
    });

    $('.main').click(function() {
        $('.mouse-click').show();
        $('.mouse-click').hide(300);
    });
    $('#diff-11, #diff-12').click(function() {
        $('#diff-11, #diff-12').css({'border':'2px solid red'});
        i++;
        checkGYL();
    });

    $('#diff-21, #diff-22').click(function() {
        $('#diff-21, #diff-22').css({'border':'2px solid red'});
        j++;
        checkGYL();
    });

    $('#diff-31, #diff-32').click(function() {
        $('#diff-31, #diff-32').css({'border':'2px solid red'});
        k++;
        checkGYL();
    });    
});

function checkGYL()
{
    if (i>0 && j>0 && k >0) {
         $('.dialogNoteS').dialog({
            modal: true,
            buttons: {
                    Ok: function() {
                        location.replace('../puzze/index.html');
                    }
                }
        });
    }
}